<?php
declare(strict_types=1);

namespace app\common\validate;

use think\Validate;

/**
 * | Notes：提现验证表
 * +----------------------------------------------------------------------
 * | PHP Version 7.2+
 * +----------------------------------------------------------------------
 * | Copyright (c) 2011-2020 https://www.xxq.com.cn, All rights reserved.
 * +----------------------------------------------------------------------
 * | Author: 和好 <389123492@qq.com>
 * +----------------------------------------------------------------------
 * | Date: 2020/12/17 17:49
 * +----------------------------------------------------------------------
 */
class Transfer extends Validate
{
    // 验证规则
    protected  $rule = [
        'cash_money'    => 'require',
        'money'         => 'require',
        'service_money' => 'require',
        'status'        => 'require',
        'remark'        => 'require',
        'safety_code'   => 'require',
        'verify_code'   => 'require',

    ];

    protected  $message = [
        'cash_money.require'    => '缺少提现金额参数',
        'money.require'         => '缺少提现金额参数',
        'service_rate.require'  => '缺少服务费率参数',
        'service_money.require' => '缺少服务费参数',
        'remark.require'        => '缺少备注参数',
        'status.require'        => '缺少状态参数',
        'safety_code.require'   => '缺少安全码参数',
        'verify_code.require'   => '缺少验证码参数',
    ];

    protected  $scene = [
        'pushVerifyTransfer' => ['to_address', 'symbol', 'cash_money', 'service_rate', 'service_money'],
        'addTransfer'        => ['from_address', 'to_address', 'symbol', 'cash_money', 'money', 'service_rate', 'service_money', 'remark', 'remark'],
        'updateTransfer'     => ['hash', 'status', 'remark', 'password', 'from_address']
    ];
}